#ifndef LOCATIONPOPMENU_H_IIUYTRC
#define LOCATIONPOPMENU_H_IIUYTRC


#include "../../../../kegui_global.h"


#include <QWidget>
#include <QPaintEvent>
#include <QVBoxLayout>
#include <QFont>
#include <QPointF>
#include "../kebtn/KeButtonCombox.h"

namespace kepen {
namespace core {

int KEGUI_EXPORT LocationConvertCode2Id(quint32 code);

class KEGUI_EXPORT LocationPopMenu : public QWidget
{
    Q_OBJECT
public:
    explicit LocationPopMenu(QWidget *parent ,const QFont &font);
    ~LocationPopMenu();


protected:

    void mouseMoveEvent(QMouseEvent *event) override;
    void mousePressEvent(QMouseEvent *event) override;
    void mouseReleaseEvent(QMouseEvent *event) override;
    void paintEvent(QPaintEvent *) override;
private:
    int getIdOfTouched(const QPointF &point);
    void onPaintButtons(QPainter *painter,const  QSize &rectWin);
public:
    KeButtonCombox *btnMenu;
private:
    bool isMouseLeftDown;
    int m_nIdTouchedDown,m_nIdMouseOver;
    int idMenuArray[5];
    QPointF ptDown;
    QFont fontIcon;

Q_SIGNALS:
    void onClickedMenuSignals(QWidget *dlg,int id);

public Q_SLOTS:
    void timeoutClose();
};

}
}
#endif // LOCATIONPOPMENU_H
